<template>
	<view class="base-mine">
		<view class="mine">
			联系我们：020-19999999
		</view>
		<!-- <view class="mine">
			<rich-text :nodes="agreementsContent"></rich-text>
		</view> -->
	</view>
</template>

<script setup>
	import {
		getMineCall,
		getAgreements
	} from '@/api/User.js'
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'

	onLoad(() => {
		getList()
	})
	const getList = () => {
		getMineCall('联系我们').then(res => {
			const mine = document.querySelector('.mine')
			if (res.code == 200) {
				res.rows?.forEach(item => {
					const view = document.createElement('view')
					view.innerHTML = item.content
					mine.appendChild(view)
				})
			}
		})
	}
	// let agreementsContent = ref('')
	// onLoad(() => {
	// 	getIsAgreements()
	// })
	
	// function formatterImage(data) {
	// 	if (data == "") return "";
	// 	let jsonDa = JSON.stringify(data).replace(/\/<img\/gi/,
	// 		"<img class='richImg'style='width:100%!important;height:auto!important;max-height:100%;'");
	// 	let newResData = JSON.parse(jsonDa);
	// 	return newResData;
	// }
	// async function getIsAgreements() {
	// 	let res = await getAgreements('6');
	// 	agreementsContent.value = formatterImage(res.data?.content);
	// }
</script>

<style lang="less" scoped>
	.base-mine {
		padding: 20rpx 28rpx;
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		overflow-y: auto;
		background: #fff;

		.mine {
			text-indent: 1em;
			color: #000000;
			font-family: "PingFang SC";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx;
			opacity: 0.5;
		}
	}
</style>